home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1300 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.9 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: luzskru.cpcnet.com!not-for-mail
  3. From: cro99@cs.geneseo.edu (Craig Olrich)
  4. Subject: Wriring to the serial port
  5. Message-ID: <1a7cc$6323.211@luzskru.cpcnet.com>
  6. Date: Wed, 10 Jan 1996 06:03:35 GMT
  7. Organization: SUNY Geneseo
  8. X-Newsreader: WinVN 0.99.5
  9. MIME-Version: 1.0
  10. Content-Type: Text/Plain; charset=ISO-8859-1
  11.  
  12.      I've been working for a while, trying to write a DOS program that will 
  13. write to the modem.  The program is only for myself, so I know that the modem 
  14. is in COM 1 and I know the number, so nothing needs to be taken from the user. 
  15. I'm using Borland C++ v4.0.  I discovered the _bios_serialcom function, but 
  16. have not been able to use it to my liking.  The function wants a COM port, 
  17. either SEND, RECIEVE, or INIT, and then an unsigned int to write to the port.  
  18. I tried sending ATZ (well, the ASCII equivalents) one by one and as a group, 
  19. but I never got to hear the click sound that an ATZ should cause.  Sending the 
  20. number didn't work either.  So, I'm kind of stumped.  I have code that will 
  21. dial if you type the ATDT5551212, but I really want to hard code the number in 
  22. so all I have to do is double-click.
  23.      Am I on the right track here?  Is there something cryptic (or blatantly 
  24. obvious) that needs to be done here?  Can someone offer some help or a short 
  25. bit of code?  Thanks!  (Also, is there an equivalent UNIX function?  I run a 
  26. Linux/Win95 system, and it might be fun to use gcc for some of my own code for 
  27. a change.)
  28.  
  29. -------------------------------------------------------------------------------
  30. - Craig Olrich         ---      Freshman CS major, SUNY Geneseo               -
  31. - The good Lord knows that my opinions, except by happy conincidence,         -
  32. - in no way reflect those of the Geneseo CS faculty, students, or             -
  33. - custodians.  Thank you and good night.                                      -
  34. -------------------------------------------------------------------------------
  35.  
  36.  
  37.